const fs = require('fs');
const path = require('path');

// 创建简单的PNG图标（1x1像素，不同颜色）
const createPngIcon = (color) => {
  // 创建一个1x1像素的PNG图像
  const buffer = Buffer.from([
    0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D,
    0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
    0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00,
    0x0A, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9C, 0x63, 0x00, 0x01, 0x00, 0x00,
    0x05, 0x00, 0x01, 0x0D, 0x0A, 0x2D, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x49,
    0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
  ]);
  return buffer;
};

// 图标列表
const icons = [
  'home.png',
  'home-active.png',
  'campsite.png',
  'campsite-active.png',
  'publish.png',
  'publish-active.png',
  'message.png',
  'message-active.png',
  'profile.png',
  'profile-active.png'
];

// 创建PNG文件
icons.forEach(iconName => {
  const buffer = createPngIcon();
  fs.writeFileSync(path.join(__dirname, iconName), buffer);
  console.log(`Created ${iconName}`);
});

console.log('All PNG icons generated successfully!'); 